package com.zggk.iroad.log.logmx;

import android.content.Context;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import com.zggk.iroad.api.MyAppliCation;
import com.zggk.iroad.api.Urls;
import com.zggk.iroad.log.loglist.LogListbean;
import com.zggk.iroad.mvp.BasePresenterImpl;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class LogMxPresenter extends BasePresenterImpl<LogMxContract.View> implements LogMxContract.Presenter{
    @Override
    public void testinfo(String RZID) {
        OkGo.<String>get(Urls.YNIP + "QueryRzMX")
                .params("rzid", RZID)
                .execute(new StringCallback() {
                    @Override
                    public void onSuccess(Response<String> response) {
                        LogMxBean videoVos2 = JSON.parseObject(response.body(), LogMxBean.class);
                        if (videoVos2.getState().equals("1")){
                            mView.getData(videoVos2);
                        }
                    }
                });
    }
}
